# Install information for port types.
# Vista-ized & Zep***-ized:
[Components]
Ports
Ports.StandardIP
Ports.ENetIP
Ports.LexIP
Ports.LocalPort
Ports.LPR
# Ports.IP9100Port

[Ports]
Version=$CD_VERSION$
OemCommon=1
Templates=StandardIP,LexIP,LocalPort,LPR,IP9100Port,ENetIP
Log=FALSE

[Defines]
NET_PREFIX=%NetPrefix%
PORT_NAME=<ReadISF,$CURRENT_COMP$,Name>
PORT_IP_ADDRESS=<ReadISF,$CURRENT_COMP$,IPAddress>
PORT_HOST_NAME=<ReadISF,$CURRENT_COMP$,HostName>
VERIFIED_IP=<VerifyHostName,$PORT_IP_ADDRESS$,$PORT_HOST_NAME$>

# Check if the community name has been set in the ISF
SNMP_COMMUNITYNAME=<ReadISF,$CURRENT_COMP$,CommunityName>
# If no community name is specified in the ISF
NO_COMMUNITYNAME=<SetLabel,$SNMP_COMMUNITYNAME$,EQ,>
# else 
COMMUNITYNAME_SET=<SetLabel,$SNMP_COMMUNITYNAME$,NE,>

# Note, these are OEM specific!
NETWORK_PRINT_MONITOR=Lexmark Network Printer Monitor
NETWORK_PORT=Lexmark Network Port
LPR_REG_KEY=SYSTEM\CurrentControlSet\Control\Print\Monitors\LPR Port\Ports
MONITOR_NAME=%ENetMonitorName%
DLL_PATH=$SYSTEM_DIR$\$NET_PREFIX$lmpm.dll

# This is all for Lexmark IP ports - external network adapters
PORT_TYPE=<ReadISF,$CURRENT_COMP$,PortType>
NONE=<SetLabel,$PORT_TYPE$,EQ,>
SOME=<SetLabel,$PORT_TYPE$,NE,>
NONE2=<SetLabel,$PORT_TYPE$,EQ,0>
LPT=<SetLabel,$PORT_TYPE$,EQ,LPT>
COM=<SetLabel,$PORT_TYPE$,EQ,COM>
LPT1=<SetLabel,$PORT_TYPE$,EQ,LPT1>
LPT2=<SetLabel,$PORT_TYPE$,EQ,LPT2>
LPT3=<SetLabel,$PORT_TYPE$,EQ,LPT3>
LPT4=<SetLabel,$PORT_TYPE$,EQ,LPT4>
COM1=<SetLabel,$PORT_TYPE$,EQ,COM1>
COM2=<SetLabel,$PORT_TYPE$,EQ,COM2>
COM3=<SetLabel,$PORT_TYPE$,EQ,COM3>
COM4=<SetLabel,$PORT_TYPE$,EQ,COM4>
USB1=<SetLabel,$PORT_TYPE$,EQ,Usb1>
USB2=<SetLabel,$PORT_TYPE$,EQ,Usb2>
USB3=<SetLabel,$PORT_TYPE$,EQ,Usb3>
USB4=<SetLabel,$PORT_TYPE$,EQ,Usb4>

# Note: StandardIP now creates an IP9100 port on 9X/NT (where StandardIP is
# not available natively)
[StandardIP]
OemCommon=1
# Platform=2K,XP
[9X,NT]Requires=IP9100

[StandardIP_Actions]
Wait,Service,Spooler
[$NONE$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9100
[$USB1$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9100
[$USB2$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9102
[$USB3$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9103
[$USB4$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9104
[$LPT1$]Port,Create,$PORT_NAME$,Standard TCP/IP Port,IP,$VERIFIED_IP$,0,$SNMP_COMMUNITYNAME$,9100
[NT,$NONE$]RegistryEntry,Add,HKLM,Software\IP9100\ports,$PORT_NAME$,STR,<PortName>$PORT_NAME$</PortName><IpAddress>$VERIFIED_IP$</IpAddress><PortType>Internal</PortType>
[NT,$SOME$]RegistryEntry,Add,HKLM,Software\IP9100\ports,$PORT_NAME$,STR,<PortName>$PORT_NAME$</PortName><IpAddress>$VERIFIED_IP$</IpAddress><PortType>$PORT_TYPE$</PortType>
[9X]RegistryEntry,Add,HKLM,Software\IP9100\ports,$PORT_NAME$,STR,$VERIFIED_IP$
[9X,NT]Port,CreateWithAddPort,$PORT_NAME$,IP 9100 Port Monitor,,,0,$SNMP_COMMUNITYNAME$,9100
[9X,$NONE$]RegistryEntry,Append,HKLM,Software\IP9100\Devices,$PORT_NAME$,STR,<PortType>Internal</PortType>,,SP_APPEND_NOT_CREATE
[9X,$SOME$]RegistryEntry,Append,HKLM,Software\IP9100\Devices,$PORT_NAME$,STR,<PortType>$PORT_TYPE$</PortType>,,SP_APPEND_NOT_CREATE

[ENetIP]
Platform=NT,2K,XP,VISTA
OemCommon=0

[ENetIP_Actions]
#Run Netowrk API, which handles IPV6 addresses and it is the same call accross platforms.
[$NONE$]RunLibFunction,NetSupp.dll,AddENetPort,$DLL_PATH$|$VERIFIED_IP$|Internal|$PORT_NAME$
[$SOME$]RunLibFunction,NetSupp.dll,AddENetPort,$DLL_PATH$|$VERIFIED_IP$|$PORT_TYPE$|$PORT_NAME$

[LexIP]
OemCommon=1
Requires=Bidi,Network.TCPIP

[LexIP_Actions]
[$COMMUNITYNAME_SET$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$PORT_IP_ADDRESS$,CommunityName,STR,$SNMP_COMMUNITYNAME$
[$NO_COMMUNITYNAME$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$PORT_IP_ADDRESS$,CommunityName,STR,public

[$NONE$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortName,STR,$PORT_NAME$
[$NONE2$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortName,STR,$PORT_NAME$
[$LPT$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortName,STR,$PORT_NAME$
[$COM$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortName,STR,$PORT_NAME$
[$LPT1$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameP1,STR,$PORT_NAME$
[$LPT2$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameP2,STR,$PORT_NAME$
[$LPT3$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameP3,STR,$PORT_NAME$
[$COM1$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameS1,STR,$PORT_NAME$
[$COM2$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameS2,STR,$PORT_NAME$
[$COM3$]RegistryEntry,Add,HKLM,software\lexmark\markvision\IPNET\$VERIFIED_IP$,PortNameS3,STR,$PORT_NAME$
# RegistryEntry,Add,HKLM,software\lexmark\markvision\AutoAdd,New Port Name,STR,$PORT_NAME$
# RegistryEntry,Add,HKLM,software\lexmark\markvision\AutoAdd,New Port NetType,BINARY,02
# We need the spooler and LexBceS service running before we can call AddPort!
[NT_XP,VISTA,FUTURE_OS]Wait,Service,LexBceS
[NT_XP,VISTA,FUTURE_OS]Wait,Service,Spooler
[9X]Port,CreateWithAddPort,$PORT_NAME$,$NETWORK_PRINT_MONITOR$,,,1,$SNMP_COMMUNITYNAME$,9100
[NT_XP,VISTA,FUTURE_OS]Port,CreateWithAddPort,$PORT_NAME$,$NETWORK_PORT$,,,1,$SNMP_COMMUNITYNAME$,9100


[LocalPort]
OemCommon=1

[LocalPort_Actions]
[2K,XP,VISTA,FUTURE_OS]Wait,Service,Spooler
[NT]RegistryEntry,Add,HKLM,SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports,$PORT_NAME$,STR,
[2K,XP,VISTA,FUTURE_OS]Port,Create,$PORT_NAME$,Local Port,UNC,$PORT_NAME$,0,$SNMP_COMMUNITYNAME$,9100
# NT requires a spooler restart to get it to recognise the new port
# Lets actually recycle the spooler. Just stopping it could cause problems down the line
# with something that needs the spooler started in order to work.
[NT]Service,Recycle,Spooler,5000

[LPR]
OemCommon=1
Platform=NT,2K,XP,VISTA

[LPR_Actions]
# Note: we may want an external requirement here to check that the LPR
# port monitor exists!
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$,Printer Name,STR,$PORT_NAME$
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$,Server Name,STR,$PORT_IP_ADDRESS$
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$,EnableBannerPage,DWORD,0
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$,HpUxCompatibility,DWORD,0
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$,OkiSunCompatibility,DWORD,0
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$\Timeouts,CommandTimeout,DWORD,120
RegistryEntry,Add,HKLM,$LPR_REG_KEY$\$PORT_NAME$\Timeouts,DataTimeout,DWORD,300
# Unfortunately, this requires a spooler restart to get it to recognise the new port
[NT_XP,VISTA,FUTURE_OS]Service,Recycle,Spooler,5000
